import os
import click
from app import db

def register(app):
    @app.cli.command('init_db', short_help='创建数据库')
    def init_db():
        print('init db...')
        db.create_all()
        print('success created')
